package com.caac.core.dao;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

import com.caac.core.config.OrderClazz;
import com.caac.core.config.QueryClass;

/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright CAIRB 2006</p>
 * <p>Company: CAIRB</p>
 * @author <a href="mailto:project@CAIRB.com.cn">Project Group</a>
 * @version 1.0
 */

public interface BaseDao {
    public Object getObjectById(Class entityClass, Serializable id);

    public Object loadObjectById(Class entityClass, Serializable id);

    public void setFlushModeAuto();

    public void saveObject(Object entity);

    public void newObject(Object entity);

    public void deleteObject(String entity);

    public void deleteObject(Object entity);

    public void deleteObjectById(Class entityClass, Serializable id);

    public void deleteAllObjects(Collection entities);

    public List getAllObjects(Class entityClass);

    public List getAllObjects(final Class clazz, final OrderClazz oc);

    public List getObjects(final Class clazz, final int from, final int size,
                           final String orderName);

    public List getObjects(final Class clazz, final QueryClass qc,
                           final Object bean, final boolean and,
                           final OrderClazz oc, final CriteriaCallback cc,
                           final int from, final int size);

    public List getObjects(final Class clazz, final QueryClass qc,
                           final Object bean, final boolean and,
                           final OrderClazz oc, final int from, final int size);

    public List getObjects(final Class clazz, final QueryClass qc,
                           final Object bean, final boolean and,
                           final CriteriaCallback cc, final int from,
                           final int size);

    public List getObjects(final Class clazz, final QueryClass qc,
                           final Object bean, final boolean and, final int from,
                           final int size);

    public List getObjects(final Class clazz, final QueryClass qc,
                           final Object bean, final boolean and,
                           final OrderClazz oc, final CriteriaCallback cc);

    public List getObjects(final Class clazz, final QueryClass qc,
                           final Object bean, final boolean and,
                           final OrderClazz oc);

    public List getObjects(final Class clazz, final QueryClass qc,
                           final Object bean, final boolean and,
                           final CriteriaCallback cc);

    public List getObjects(final Class clazz, final QueryClass qc,
                           final Object bean, final boolean and);

    public List getObjects(final Class clazz, final String whereString,
                           final OrderClazz oc, final int from, final int size);

    public List getObjects(final Class clazz, final String whereString,
                           final OrderClazz oc);

    public List getObjects(final Class clazz, final String sql, final int count);

    public List getObjects(final Class clazz, final String whereString,
                           final int from, final int size);

    public List getObjects(final Class clazz, final String whereString);

    public int getCount(final Class clazz, final QueryClass qc,
                        final Object bean, final boolean and,
                        final CriteriaCallback cc);

    public int getCount(final Class clazz, final QueryClass qc,
                        final Object bean, final boolean and);

    public int getCount(final Class clazz, final String whereString);

    public int getAllCount(final Class clazz);

    public void execNoResultProc(String strSql);

    public void execNoResultSql(String strSql);

    public List execSqlWithResult(String strSql);

    public Object getArray(List rstList, int row, int col);
}